// skill.h
#pragma once
#include <QObject>
#include "element.h"
#include "pokemon.h"

class Skill : public QObject {
    Q_OBJECT
public:
    Skill(QString name, int power, Element element);

    QString getName() const;
    int getPower() const;
    Element getElement() const;

    // 计算伤害
    virtual int calculateDamage(Pokemon* user, Pokemon* target);
    virtual void use(Pokemon* user, Pokemon* target);

signals:
    void skillUsed(QString message);

protected:
    QString m_name;
    int m_power;
    Element m_element;
};

// 具体技能示例
class WaterGun : public Skill {
    Q_OBJECT
public:
    WaterGun();
};

class Flamethrower : public Skill {
    Q_OBJECT
public:
    Flamethrower();
};
